<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.yinbo.database.DbConnectionManager,
				java.sql.Connection,
				java.sql.SQLException,
				java.sql.Statement,
				java.sql.ResultSet,
				java.util.ArrayList,
				com.yinbo.util.Constants
				"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
Connection connection =  DbConnectionManager.getConnection();
Statement stmt = connection.createStatement();
ResultSet rs ;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>首页--作品展示</title>
	<link href="styles/main.css" rel="stylesheet" type="text/css" />
	<link href="styles/common.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="styles/jquery.lightbox-0.4.css" media="screen" />
	<script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/jquery.lightbox-0.4.pack.js"></script>
    <script type="text/javascript">
    $(function() {
        $('#imgpi1 a').lightBox();
        $('#imgpi2 a').lightBox();
        $('#imgpi3 a').lightBox();
        $('#imgpi4 a').lightBox();
        $('#imgpi5 a').lightBox();
        $('#imgpi6 a').lightBox();
        $('#imgpi7 a').lightBox();
        $('#imgpi8 a').lightBox();
        $('#imgpi9 a').lightBox();
        $('#imgpi10 a').lightBox();
    });
    </script>
  </head>
  <body>
<div id="Wrap">
<%@ include file="common/menu.jsp"%>
    <%
      int i=0;
      rs = stmt.executeQuery(" select * from showwork b where b.show_time='2009' order by b.show_id desc limit 10");
	  while(rs.next()) {
	  	String show_time = rs.getString("show_time");
	  %>
	<div id="YearTitle">
		<img src="images/<%=show_time %>.gif" width="88" height="30" alt="<%=show_time %>" />
	</div>
    <div class="ShowCont">
	    <div id="imgpi<%=i+1 %>">
	    	<a href="uploadImg/<%=rs.getString("show_img") %>" title="这是我的第一个jquery作">
	    		<img src="images/img01.gif" width="101" height="143" /><br><br>点小图看大图
	    	</a>
	    </div>
		<div class="ShowDoc">
        	<div class="DocTop"></div>
            <div class="DocCenter">
                <p><%=rs.getString("show_content") %></p>
            </div>
			<div class="DocBottom"></div>
      </div>
  </div>
  
   <%
   i++;
   }
   	if(null!=rs){rs.close();}
   %>
   <%
   	  int j=1;
      rs = stmt.executeQuery(" select * from showwork b where b.show_time='2008' order by b.show_id desc limit 10");
	  while(rs.next()) {
	  	String show_time = rs.getString("show_time");
	  %>
	<div id="YearTitle"><img src="images/<%=show_time %>.gif" width="88" height="30" alt="<%=show_time %>" /></div>
    <div class="ShowCont">
    	<div id="imgpi<%=j+2 %>">
	    	<a href="uploadImg/<%=rs.getString("show_img") %>" title="这是我的第一个jquery作">
	    		<img src="images/img01.gif" width="101" height="143" /><br><br>点小图看大图
	    	</a>
	    </div>
		<div class="ShowDoc">
        	<div class="DocTop"></div>
            <div class="DocCenter">
                <p><%=rs.getString("show_content") %></p>
            </div>
			<div class="DocBottom"></div>
      </div>
  </div>
   <%
   j++;
   }
   	if(null!=rs){rs.close();}
   %>
 <%@ include file="common/bottom.jsp"%>
</div>
  </body>
</html>
